package com.rc.saas.tenant.service.tenant;


import com.rc.saas.tenant.base.BaseService;
import com.rc.saas.tenant.mapper.tenant.TenantMenuMapper;
import com.rc.saas.tenant.model.operator.TenantOperator;
import com.rc.saas.tenant.model.platform.PlatformMenu;
import com.rc.saas.tenant.model.tenant.TenantMenu;
import com.rc.saas.tenant.model.tenant.TenantMenuExample;
import com.rc.saas.tenant.model.tenant.TenantUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by sven on 2018-04-17
 */
public interface TenantMenuService extends BaseService<Long, TenantMenu, TenantMenuExample, TenantMenuMapper> {
    void deleteMenu(Long id);

    List<TenantMenu> listMenuByRole(Long roleId);

    List<TenantMenu> listMenuByTopMenuId(TenantUser tenantUser, Long topMenuId);

    TenantMenu selectMenuByPermission(Long tenantMenuId, String permission);

    /**
     * 按分销商查询菜单
     * @return
     */
    List<TenantMenu> listMenuByOperator();

    /**
     * 按企业会员查询菜单
     * @return
     */
    List<TenantMenu> listMenuByEnterprise();

    /**
     * 根据TOP菜单查询分销商菜单
     */
    List<TenantMenu> listOperatoMenuByTopMenuId(Long topMenuId);

    List<TenantMenu> listOperatoMenuByTopMenuIdAndOperator(String tenantOperatorCode, Long topMenuId);


    /**
     * 根据TOP菜单查询企业会员菜单
     */
    List<TenantMenu> listEnterpriseMenuByTopMenuId(Long topMenuId);

    //List<TenantMenu> selectOperatoMenuByTopMenuId(String tenantCode, Long topMenuId);

    /**
     * 按运营商查询TOP菜单
     * @return
     */
    List<TenantMenu> listTopMenuByTenant(TenantUser user);

    /**
     * 按分销商查询TOP菜单
     * @return
     */
    List<TenantMenu> listTopMenuByOperator();

    /**
     * 按企业会员查询TOP菜单
     * @return
     */
    List<TenantMenu> listTopMenuByEnterprise();
}
